This is the data that Victor M generated for the predicted and novel miRNA. I’ve analyzed miRNA expression by
+ Neural Tube Defects’ (NTDs) status
+ Sex
+ Trimester
+ Ancestry (TBD)

Figures and plots to be made


Data Loading and Visualisation:

Phenotype Info:

Breakdown of Samples by Trimester
1 (N=5) 2 (N=16) 3 (N=9) Total (N=30)
condition
   con 5 (100.0%) 10 (62.5%) 9 (100.0%) 24 (80.0%)
   NTD 0 (0.0%) 6 (37.5%) 0 (0.0%) 6 (20.0%)
sex
   FEMALE 3 (60.0%) 10 (62.5%) 4 (44.4%) 17 (56.7%)
   MALE 2 (40.0%) 6 (37.5%) 5 (55.6%) 13 (43.3%)
450k.array
   Match 0 (0.0%) 15 (93.8%) 9 (100.0%) 24 (80.0%)
   No Match 5 (100.0%) 1 (6.2%) 0 (0.0%) 6 (20.0%)

Genotype Info:

## [1] TRUE

Controls vs NTDs in Trimester 2 samples:

(Univariate Analysis)

Considering only Trimester 2 Samples:

## [1] TRUE
## Warning in fitFDist(var, df1 = df, covariate = covariate): More than half of
## residual variances are exactly zero: eBayes unreliable
## Removing intercept from test coefficients

Now here, we need to specify that we want to consider condition as our variable or coefficient of interest. Otherwise, the function relies on the default intercept which would give us different results:


Sex-Differential Genes for the 2nd and 3rd trimester:

(Multivariate Analysis):

## [1] TRUE
## Warning in fitFDist(var, df1 = df, covariate = covariate): More than half of
## residual variances are exactly zero: eBayes unreliable
## [1] 80

Making contrasts manually as opposed to implicit determinimation using lmFit:

However, since there is only variable we’re considering above (sex), we don’t really need to use a contrast matrix. (Specifying coef = 2 in tri23genes_sex isn’t going to make a difference since there is only one variable and we aren’t controlling for confoudnders or covariates)

## Removing intercept from test coefficients

Now, if we actually applied the same coef fucntion to consider sex as the variable of interest in the Controls vs NTDs in Trimester 2 samples analysis above, we get the same significantly differentially expressed miRNA by sex as when looking at Sex-Differential Genes in Trimester 2 and 3:


Differential miRNA by Trimester in Controls:

## [1] TRUE
## Warning in fitFDist(var, df1 = df, covariate = covariate): More than half of
## residual variances are exactly zero: eBayes unreliable
## [1] 97
## [1] 153
## data frame with 0 columns and 0 rows